<?php
/**
 * Created by PhpStorm.
 * User: SW
 * Date: 2017/10/25
 * Time: 14:30
 */

function ajaxHeader()
{
    // 指定允许其他域名访问
    header('Access-Control-Allow-Origin:*');
// 响应类型
    header('Access-Control-Allow-Methods:POST');
// 响应头设置
    header('Access-Control-Allow-Headers:x-requested-with,content-type');
}